#ifndef ENUMIMPLEMENTATIONS_H_
#define ENUMIMPLEMENTATIONS_H_

#include "EnumConverter.h"

#include <ndefrecord.h>

#include "XmlDefs.h"

#define MAKE_LIT8(str) _LIT8(str, #str)

template<>
struct EnumImplementation<CNdefRecord::TNdefRecordTnf> : public EnumDefinition<CNdefRecord::TNdefRecordTnf>
    {
    static void FillMapL(ValueMap & aMap)
        {
        MAKE_LIT8(empty);
        MAKE_LIT8(wellKnown);
        MAKE_LIT8(mime);
        MAKE_LIT8(uri);
        MAKE_LIT8(external);
        MAKE_LIT8(unknown);
        MAKE_LIT8(unchanged);
        MAKE_LIT8(reserved);
        
        aMap.AppendL(Mapping(CNdefRecord::EEmpty, empty));
        aMap.AppendL(Mapping(CNdefRecord::ENfcWellKnown, wellKnown));
        aMap.AppendL(Mapping(CNdefRecord::EMime, mime));
        aMap.AppendL(Mapping(CNdefRecord::EUri, uri));
        aMap.AppendL(Mapping(CNdefRecord::ENfcExternal, external));
        aMap.AppendL(Mapping(CNdefRecord::EUnknown, unknown));
        aMap.AppendL(Mapping(CNdefRecord::EUnchanged, unchanged));
        aMap.AppendL(Mapping(CNdefRecord::EReserved, reserved));
        }
    };

template<>
struct EnumImplementation<CNdefRecord::TNdefRecordChunk> : public EnumDefinition<CNdefRecord::TNdefRecordChunk>
    {
    static void FillMapL(ValueMap & aMap)
        {
        MAKE_LIT8(notChunked);
        MAKE_LIT8(chunkBegin);
        MAKE_LIT8(chunkMiddle);
        MAKE_LIT8(chunkEnd);
        
        aMap.AppendL(Mapping(CNdefRecord::ENotChunked, notChunked));
        aMap.AppendL(Mapping(CNdefRecord::EChunkBegin, chunkBegin));
        aMap.AppendL(Mapping(CNdefRecord::EChunkMiddle, chunkMiddle));
        aMap.AppendL(Mapping(CNdefRecord::EChunkEnd, chunkEnd));
        }
    };

template<>
struct EnumImplementation<Xml::TAttribute> : public EnumDefinition<Xml::TAttribute>
    {
    static void FillMapL(ValueMap & aMap)
        {
        MAKE_LIT8(id);
        MAKE_LIT8(type);
        MAKE_LIT8(recordCount);
        MAKE_LIT8(tnf);
        MAKE_LIT8(chunk);
        
        aMap.AppendL(Mapping(Xml::EAttrId, id));
        aMap.AppendL(Mapping(Xml::EAttrType, type));
        aMap.AppendL(Mapping(Xml::EAttrRecordCount, recordCount));
        aMap.AppendL(Mapping(Xml::EAttrTnf, tnf));
        aMap.AppendL(Mapping(Xml::EAttrChunk, chunk));
        }
    };

#endif /* ENUMIMPLEMENTATIONS_H_ */
